package logic

import (
	"github.com/hibiken/asynq"
	"github.com/zeromicro/go-zero/core/logx"
	"navi-mumbai/app/timer/job/jobtype"
)

func (l *MqueueScheduler) updateUserProvider1GameOrderDailyStat() {
	task := asynq.NewTask(jobtype.ScheduleUpdateProvider1GameOrderDailyStat, nil)

	spec := "0 0 * * *" // 每天的0点0分
	//spec := "*/1 * * * *" // 一分钟一次
	entryID, err := l.svcCtx.Scheduler.Register(spec, task)
	if err != nil {
		logx.WithContext(l.ctx).Errorf("!!!MqueueSchedulerErr!!! ====> 【updateUserProvider1GameOrderDailyStat】 registered  err:%+v , task:%+v", err, task)
		return
	}
	logx.WithContext(l.ctx).Infof("【updateUserProvider1GameOrderDailyStat】 registered an  entry: %q \n", entryID)
	return
}
